package com.atguigu.admin.controller;

import com.atguigu.admin.bean.City;
import com.atguigu.admin.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class CityController {

    @Autowired
    private CityService cityService;


    @PostMapping("/insert")
    @ResponseBody
    public City exInsert(City city){

        cityService.cityInsert(city);


        return city;
    }
}
